package com.lzj.demo.design.decorator;

import org.springframework.web.servlet.HandlerInterceptor;

/**
 * 装饰角色:定义抽象类并继承接口中的方法,保证一致性
 * */
public abstract class SsoDecorator implements HandlerInterceptor {
    private final SsoInterceptor handlerInterceptor;

    public SsoDecorator(SsoInterceptor handlerInterceptor) {
        this.handlerInterceptor = handlerInterceptor;
    }

    public boolean preHandler(String flag) throws Exception {
        return handlerInterceptor.preHandle(flag);
    }
}
